user=$(whoami)

sudo su <<EOF
. $CANGJIE_HOME/envsetup.sh
cjpm clean
rm -r cov_html
cjpm test --coverage
cjcov --html-details --exclude *_test.cj --output cov_html
cjpm clean
chown -R $user cov_html
EOF